use super::{blog, idea};

#[derive(Debug)]
pub enum Request {
    // blog messages, send to grpc client module
    BlogAdd(blog::AddRequest),
    BlogGet(u32),
    BlogUpdate(blog::UpdateRequest),
    BlogDelete(u32),
    BlogsGet(blog::GetMutipleRequest),
    BlogViewInc(u32),
    BlogStarInc(u32),
    BlogStarDec(u32),

    // idea messages, send to grpc client module
    IdeaAdd(idea::AddRequest),
    IdeaGet(u32),
    IdeaUpdate(idea::UpdateRequest),
    IdeaDelete(u32),
    IdeasGet(idea::GetMutipleRequest),
    IdeaViewInc(u32),
    IdeaStarInc(u32),
    IdeaStarDec(u32),
}

#[derive(Debug)]
pub enum Response {
    Ok(),
    Error(String),

    // Response from grpc client module for blog operation
    BlogAdd(u32),
    BlogGet(blog::Blog),
    BlogsGet(blog::GetMutipleResponse),
    Views(u32),
    Stars(u32),

    // Response from grpc client module for idea operation
    IdeaAdd(u32),
    IdeaGet(idea::Idea),
    IdeasGet(idea::GetMutipleResponse),
}
